home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HyperLib 1997 Winter - Disc 1
/
HYPERLIB-1997-Winter-CD1.ISO.7z
/
HYPERLIB-1997-Winter-CD1.ISO
/
オンラインウェア
/
PRG
/
MacPerl 506 appl folder.sit
/
MacPerl 506 appl folder
/
Mac_Perl_506r1m_appl
/
lib
/
AutoLoader.pm
< prev
next >
Wrap
Text File
|
1995-03-19
|
707b
|
28 lines
package AutoLoader;
use Carp;
AUTOLOAD {
# my $name = "auto/$AUTOLOAD.al";
# $name =~ s#::#/#g;
my $name = ":auto:$AUTOLOAD.al";
$name =~ s#::#:#g;
eval {require $name};
if ($@) {
# The load might just have failed because the filename was too
# long for some old SVR3 systems which treat long names as errors.
# If we can succesfully truncate a long name then it's worth a go.
# There is a slight risk that we could pick up the wrong file here
# but autosplit should have warned about that when splitting.
if ($name =~ s/(¥w{12,})¥.al$/substr($1,0,11).".al"/e){
eval {require $name};
}
if ($@){
$@ =~ s/ at .*¥n//;
croak $@;
}
}
goto &$AUTOLOAD;
}
1;